package org.hbgl.geoentity.db.dao;

import org.apache.ibatis.annotations.Param;
import org.hbgl.geoentity.db.domain.GeNode;
import org.hbgl.geoentity.db.domain.GeNodeApply;
import org.hbgl.geoentity.db.domain.GeNodeExample;
import org.hbgl.geoentity.db.domain.GeUnit;
import org.hbgl.geoentity.db.vo.AnalyRecordVo;
import org.hbgl.geoentity.db.vo.NodeApplyVo;
import org.hbgl.geoentity.db.vo.NodeVo;

import java.time.LocalDateTime;
import java.util.List;

public interface GeNodeMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ge_node
     *
     * @mbg.generated
     */
    long countByExample(GeNodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ge_node
     *
     * @mbg.generated
     */
    int deleteByExample(GeNodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ge_node
     *
     * @mbg.generated
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ge_node
     *
     * @mbg.generated
     */
    int insert(GeNode record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ge_node
     *
     * @mbg.generated
     */
    int insertSelective(GeNode record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ge_node
     *
     * @mbg.generated
     */
    GeNode selectOneByExample(GeNodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ge_node
     *
     * @mbg.generated
     */
    GeNode selectOneByExampleSelective(@Param("example") GeNodeExample example, @Param("selective") GeNode.Column ... selective);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ge_node
     *
     * @mbg.generated
     */
    List<GeNode> selectByExampleSelective(@Param("example") GeNodeExample example, @Param("selective") GeNode.Column ... selective);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ge_node
     *
     * @mbg.generated
     */
    List<GeNode> selectByExample(GeNodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ge_node
     *
     * @mbg.generated
     */
    GeNode selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") GeNode.Column ... selective);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ge_node
     *
     * @mbg.generated
     */
    GeNode selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ge_node
     *
     * @mbg.generated
     */
    int updateByExampleSelective(@Param("record") GeNode record, @Param("example") GeNodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ge_node
     *
     * @mbg.generated
     */
    int updateByExample(@Param("record") GeNode record, @Param("example") GeNodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ge_node
     *
     * @mbg.generated
     */
    int updateByPrimaryKeySelective(GeNode record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ge_node
     *
     * @mbg.generated
     */
    int updateByPrimaryKey(GeNode record);

    List<NodeVo> selectNodeList(@Param("area") String area, @Param("keywords") String keywords);

    List<NodeVo> selectNodeListNew(@Param("nodeType") Integer nodeType, @Param("examState") Integer examState, @Param("keywords") String keywords);

    NodeVo selectNodeById(@Param("id") Integer id);

    List<GeUnit> selectUnitListAll();

    List<GeNodeApply> findNodeApplyByUnitId(@Param("unitId") Integer unitId, @Param("state") Integer state);

    List<NodeApplyVo> selectNodeApplyList(@Param("area") String area, @Param("keywords") String keywords);

    List<NodeApplyVo> selectNodeApplyExamList(@Param("area") String area, @Param("keywords") String keywords, @Param("list") List<Integer> list);

    List<NodeApplyVo> queryNodeApplyList(@Param("unitId") Integer unitId, @Param("area") String area, @Param("state") Integer state, @Param("keywords") String keywords);

    NodeApplyVo findNodeApplyById(@Param("id") Integer id);

    int delNodeApplyById(@Param("id") Integer id);
    int delNodeByApplyId(@Param("id") Integer id);

    int updateNodeApplyById(@Param("nodeApply") GeNodeApply nodeApply);

    List<NodeVo> selectNodeExamlist(@Param("nodeType") Integer nodeType, @Param("examState") Integer examState, @Param("keywords") String keywords);

    List<NodeVo> selectAuthExamlist(@Param("area") String area, @Param("keywords") String keywords);

    List<NodeVo> selectAuthExamStatelist(@Param("area") String area, @Param("keywords") String keywords, @Param("list") List<Integer> list);

    NodeVo findAuthById(@Param("id") Integer id);

    List<NodeVo> findAuthByNodeId(@Param("nodeId") Integer nodeId);

    NodeVo findNodeById(@Param("id") Integer id);

    List<NodeVo> selectAuthDataList(@Param("nodeType") Integer nodeType, @Param("area") String area, @Param("keywords") String keywords, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<AnalyRecordVo> selectAnalyRecordList(@Param("nodeType") Integer nodeType, @Param("area") String area, @Param("keywords") String keywords, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<GeNodeApply> findNodeApplyByNodeName(@Param("nodeName") String nodeName);

    List<GeNode> findNodeByNodeName(@Param("nodeName") String nodeName);
    List<GeNode> findNodeByApplyId(@Param("applyId") Integer applyId);

    int insertNodeApply(GeNodeApply nodeApply);

    int updateNodeApply(@Param("nodeApply") GeNodeApply nodeApply);

    List<NodeVo> selectUnitNodeList(@Param("unitId") Integer unitId, @Param("nodeType") Integer nodeType, @Param("state") Integer state, @Param("keywords") String keywords);

    List<GeNodeApply> findNodeApplyByAddressCode(@Param("provinceCode") String provinceCode, @Param("cityCode") String cityCode, @Param("areaCode") String areaCode);

    int updateNodeExamStateByApplyId(@Param("examState") Integer examState, @Param("applyId") Integer applyId);

    List<NodeApplyVo> selectEscalationDataList(@Param("isEscalation") Integer isEscalation, @Param("keywords") String keywords, @Param("startTime") String startTime, @Param("endTime") String endTime);

}
